#pragma once
#include "DXAMLCommon.h"

#include "CDependencyObject.h"
#include "DREQUEST.h"

#include "REQUEST.h"

class CContentControl;


class CApplication :
	public CDependencyObject
{
protected: 
	CApplication();
private: 
	CApplication(CCoreServices * pCore);
protected: 
	virtual ~CApplication();
public: 
	CXcpList<REQUEST> * m_pEventList;
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual XUINT32 AddRef();
	virtual XUINT32 Release();
	virtual XUINT32 GetTypeIndex() const;
	virtual HRESULT EnterImpl(CDependencyObject * pNamescopeOwner, struct EnterParams params);
	virtual HRESULT LeaveImpl(CDependencyObject * pNamescopeOwner, struct LeaveParams params);
	virtual HRESULT SetValue(CDependencyProperty * pdp, CValue * pValue);
	virtual HRESULT AddEventListener(CDependencyProperty * pdp, CValue * pValue, XINT32 iListenerType, CValue * pResult, XBOOL fHandledEventsToo);
	virtual HRESULT RemoveEventListener(CDependencyProperty * pdp, CValue * pValue);
	static HRESULT  RequestStartup(struct Xcp_IDependencyObject *, XUINT32, CValue *, CValue *);
	static HRESULT RequestStarted(struct Xcp_IDependencyObject *, XUINT32, CValue *, CValue *);
	void FireStartupEvent();
	void FireExitEvent();
	void FireStartingEvent();
	void FireStartedEvent();
	void FireExitingEvent();
	void FireExitedEvent();
	static HRESULT LoadComponent(CCoreServices * pCore, CDependencyObject * pComponent, struct IPALUri * pUri);
	virtual XBOOL ParticipatesInManagedTreeInternal();
	CResourceDictionary * m_pResources;
	enum ApplicationTheme m_requestedTheme;
	static HRESULT CreateBaseUri(XUINT32 cUriString, XUINT16 * pUriString, struct IPALUri * * ppUri);
	CUIElement * m_pRootVisual;
	XBOOL m_fRootVisualSet;
	CContentControl * m_pRootScrollViewer;
	XBOOL m_bApplicationStartupCompleted;
private: 
	XINT32 m_platformOptionFlags;



};
//
//class CApplication :
//	public CDependencyObject
//{
//protected: 
//	CApplication();
//private: 
//	CApplication(CCoreServices *);
//protected: 
//	virtual ~CApplication();
//public: 
//	CXcpList<REQUEST> * m_pEventList;
//	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
//	virtual XUINT32 AddRef();
//	virtual XUINT32 Release();
//	virtual XUINT32 GetTypeIndex() const;
//	virtual HRESULT EnterImpl(CDependencyObject * pNamescopeOwner, struct EnterParams params);
//	virtual HRESULT LeaveImpl(CDependencyObject * pNamescopeOwner, struct LeaveParams params);
//	virtual HRESULT SetValue(CDependencyProperty * pdp, CValue * pValue);
//	virtual HRESULT AddEventListener(CDependencyProperty * pdp, CValue * pValue, XINT32 iListenerType, CValue * pResult, XBOOL fHandledEventsToo);
//	virtual HRESULT RemoveEventListener(CDependencyProperty * pdp, CValue * pValue);
//	static HRESULT RequestStartup(struct Xcp_IDependencyObject *, unsigned int, CValue *, CValue *);
//	static HRESULT RequestStarted(struct Xcp_IDependencyObject *, unsigned int, CValue *, CValue *);
//	void FireStartupEvent();
//	void FireExitEvent();
//	void FireStartingEvent();
//	void FireStartedEvent();
//	void FireExitingEvent();
//	void FireExitedEvent();
//	static HRESULT LoadComponent(CCoreServices * pCore, CDependencyObject * pComponent, struct IPALUri * pUri);
//	virtual XBOOL ParticipatesInManagedTreeInternal();
//	CResourceDictionary * m_pResources;
//	enum ApplicationTheme m_requestedTheme;
//	static HRESULT CreateBaseUri(XUINT32 cUriString, XCHAR * pUriString, struct IPALUri * * ppUri);
//	CUIElement * m_pRootVisual;
//	XBOOL m_fRootVisualSet;
//	CContentControl * m_pRootScrollViewer;
//	XBOOL m_bApplicationStartupCompleted;
//private: 
//	int m_platformOptionFlags;
//};

